{include mobile_template('header')}
<link rel="stylesheet" href="{URLROOT}/{$_G[tplurl_mobile]}/css/party.css" />
<div class="panel-comm panel-default panel-fullsize">
    <div class="panel-heading">
        <h1>[精彩照片] $detail[subject]</h1>
        <p class="txt-small">
            <span>发起人：$detail[username]</span>
            <span class="split"></span>
            <span>发起时间：{date $detail[dateline],'w2style'}</span>
        </p>
    </div>
    <ul class="list-thumb list-thumb-row2 party-picture-list" id="data_container">
        {include mobile_template('party_pictures_loop')}
    </ul>
    <div id="page_container" class="mb10"></div>
</div>
<script src="{URLROOT}/static/mobile/js/swipe.js"></script>
<script src="{URLROOT}/static/mobile/js/swipe_srceen.js"></script>
<script>
$(document).ready(function() {
    //bind_multipage();
        //分页插件
    $('#page_container').m_ajaxpage({
        load_mod:'override',
        container:'#data_container',
        onInit:function(page, container) {
            container.find('.list-thumb-img img').each(function(index, val) {
                $(this).click(function() {
                    swipe_srceen('#data_container', '.list-thumb-img img', index);
                });
            });
        }
    });
});
    
function bind_multipage(hide_forward) {
    $('div.J_page').html($('div.multipage'));
    $('div.pagination a').click(function() {
        load_data($(this), true);
        return false;
    });
    if(hide_forward) {
        $('div.pagination a.J_forward').hide();
    }
    //图片划屏显示绑定
    bindSwipe();
}

function load_data(my, clear_all) {
    clear_all = !clear_all ? false : true;
    url = my.attr('href').url();
    my.text('加载中...').attr('disabled','disabled');
    $.post(url, {'in_ajax':1}, function(data) {
        $('div.multipage').remove();
        if(clear_all) {
            $('.J_container').empty();
        }
        $('.J_container').append(data);
        $(window).scrollTop(0);
        bind_multipage();
    });
}

//图片划屏浏览
function bindSwipe() {
    $('.J_container img').each(function(index, val) {
        $(this).click(function() {
            swipe_srceen('.J_container', '.J_img', index);
        });
    });
}
</script>

{include mobile_template('footer')}